import request from '@/utils/request'
import {encrypt} from "@/utils/jsencrypt";
export function login(data) {
  data.lgPassword = encrypt(data.lgPassword)
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function powerSelect(data) {
  return request({
    url: '/user/powerSelect',
    method: 'post',
    data
  })
}
export function decryptStr(params) {
  return request({
    url: '/user/decryptStr',
    method: 'get',
    params
  })
}


